package biz.obake.team.touchprotector.features.upsidedown;

import biz.obake.team.touchprotector.R;
import biz.obake.team.touchprotector.d.c;
import biz.obake.team.touchprotector.tpservice.TPService;
import java.util.List;
import java.util.Map;

public class a extends biz.obake.team.touchprotector.d.b implements c.b {

    private class b {

        /* renamed from: a  reason: collision with root package name */
        boolean f1693a;

        /* renamed from: b  reason: collision with root package name */
        boolean f1694b;

        /* renamed from: c  reason: collision with root package name */
        boolean f1695c;

        /* renamed from: d  reason: collision with root package name */
        boolean f1696d;
        boolean e;
        boolean f;
        boolean g;

        private b(a aVar) {
            String c2 = biz.obake.team.touchprotector.g.c.c("UpsideDown.State");
            this.f1693a = "UpsideDown".equals(c2);
            this.f1694b = "RightSideUp".equals(c2);
            this.f1695c = "Locked".equals(biz.obake.team.touchprotector.g.c.c("TPService.State"));
            this.f1696d = "Unlocked".equals(biz.obake.team.touchprotector.g.c.c("TPService.State"));
            this.e = "RequestChannel.UpsideDown".equals(biz.obake.team.touchprotector.g.c.c("TPService.LockedBy"));
            this.f = biz.obake.team.touchprotector.g.a.g("lock_upside_down");
            this.g = biz.obake.team.touchprotector.g.a.g("unlock_right_side_up");
        }
    }

    public static void c(Map<String, String> map) {
        map.put("RequestChannel.UpsideDown", "None");
    }

    public void a(List<String> list) {
        b bVar = new b();
        if (bVar.g && bVar.e) {
            list.add(biz.obake.team.touchprotector.c.w(R.string.upsidedown_unlockingway_rightsideup));
        }
    }

    /* access modifiers changed from: protected */
    public void b(String str) {
        String str2;
        if (((str.hashCode() == -998652841 && str.equals("UpsideDown.State")) ? (char) 0 : 65535) == 0) {
            b bVar = new b();
            if (bVar.f1696d && bVar.f1693a && bVar.f) {
                str2 = "Lock";
            } else if (bVar.f1695c && bVar.f1694b && bVar.g && bVar.e) {
                str2 = "UnlockForce";
            } else {
                return;
            }
            TPService.l("RequestChannel.UpsideDown", str2, "UpsideDown");
        }
    }
}
